import request from '@/services/request';
import type { HospitalDetail, HospitalDepartment } from './type';

enum API_HOSPITAL {
  HOSPITALDETAIL_URL = '/hosp/hospital/',
  // 获取某个医院科室的数据
  HOSPITALDEPARTMENT_URL = '/hosp/hospital/department/',
}

export const reqHospitalDetailByHoscode = (hoscode: string) =>
  request.get<any, HospitalDetail>(API_HOSPITAL.HOSPITALDETAIL_URL + hoscode);
// 获取某个医院科室的数据
export const reqHospitalDepartmentByHoscode = (hoscode: string) =>
  request.get<any, HospitalDepartment>(API_HOSPITAL.HOSPITALDEPARTMENT_URL + hoscode);
